package com.gxy.learn.design.model.create.factory.abstract_factory;

import lombok.extern.slf4j.Slf4j;

/**
 * @description: 抽象工厂测试类
 * @author: gaoxueyong
 * @Date: 2022/11/7 10:30
 */
@Slf4j
public class Client {
    public static void main(String[] args) {
        ItalyDessertFactory factory = new ItalyDessertFactory();
        Coffee coffee = factory.createCoffee();
        Dessert dessert = factory.createDessert();
        log.info("{}",coffee.getName());
        dessert.show();
        AmericanDessertFactory americanDessertFactory = new AmericanDessertFactory();
        coffee = americanDessertFactory.createCoffee();
        dessert = americanDessertFactory.createDessert();
        log.info("{}",coffee.getName());
        dessert.show();
    }
}
